--------------------------------------------------------------------------------
README for "Assessing Equity and Efficiency in a Prenatal Health Program"
Damian Clarke, Gustavo Cortes Mendez & Diego Vergara Sepulveda
Journal of Population Economics
--------------------------------------------------------------------------------

This folder contains four sub-directories:
|_ data:    contains all data used in the replication materials
|_ source:  contains all source code used for replication of results
|_ results: tables and figures provided in the paper
|_ log:     a log file produced when running each piece of source code
These have been provided as zipped files (format .7z) and should be unzipped
prior to replication.

Results in the paper are provided at two levels.  The majority of the results
are based on municipal-level regressions, and a smaller number of results are
based on mother-level regressions.  The municipal-level regressions are based
on publicly available data, and are replicated following the instructions
below.  The mother-level regressions are based on linked register data provided
by the Chilean Ministries of Health and Social Development, and are restricted
use.  These data are not included in the replication materials, though all code
to generate results (both mother-level and municipal-level) is provided, and
mother-level code can be run on private data if requested from the Ministries
of Health and Social Development.  Additionally, log files are provided
documenting the generation of all results based on restricted-usage data.
Questions regarding data applications can be directed to the email at the end of
this README file.

All results based on public data in the paper can be replicated by running the
programs provided in the "source" sub-directory using the municipalAnalysis.do
file.  This do file should be run in Stata in version 11.0 or above. The only
change required to run each file is to the MAIN global at the top of each script.
This should be changed to indicate the location of these replication materials
on your computer.  For example, if the replication materials are located in a
folder called "/home/replication", the line in each script defining the MAIN
global should be set as:

    global MAIN "/home/replication/"

Additionally, this file replicates the majority of results contained in online
appendices. If you wish to generate the precise format of results from the paper,
the tex files located in this directory can be compiled, providing the complete
rendered output.

A number of external user-written ados are required, which can be installed from
Stata's SSC.  These are installed automatically if not available, provided that
internet connectivity is available. If a required ado file is not installed and
internet connectivity is not available, the script will fail to run until either
the ado has been installed and the scripts are re-run, or internet connectivity
is available and the script is re-run. 

Tables are all exported as tex files, and figures are all exported as eps files.
If you desire to replicate the precise format of these tables and figures as
presented in the paper, you can compile the tex file in the main directory using
the following command:

  xelatex -shell-escape GrowingTogether_JoPE.tex

Main Tables and Figures in the paper which are generated by the file
"municipalAnalysis.do" are:
 > Tables: 1, 2, 3, 4, 7, 8, 9.
 > Figures: 1, 2, 4.

Additionally, appendix Figures and Tables generated in this script are:
 > Tables: A1, A2, A3, A4, A5, A6, A7, A9, A10, A11, A12, A13, A14.
 > Figures: A1, A2, A3, A4, A7, A10, A11, A12.

Tables and Figures which are based on private register data and which will
not be replicated with the main analysis file (but for which all code is
available in "motherAnalysis.do" and log files are provided) are:
 > Tables 5, 6, A8, D1-D3
 > Figure 3, A5, A6, A8, A9, D1.

For any queries contact Damian Clarke at

  damian.clarke [AT] usach.cl

or

  damian.clarke [AT] protonmail.com.
